<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
  <section class="content-header">
    <h1>
      部署历史
      <small></small>
    </h1>
    <ol class="breadcrumb">
      <li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
      <li class="active">Here</li>
    </ol>
  </section>

  <!-- Main content -->
  <section class="content">

    <div class="row">
      <div class="col-xs-12">

        <div class="box">
          <!--<div class="box-header">
            <h3 class="box-title">应用列表</h3>
          </div>&lt;!&ndash; /.box-header &ndash;&gt;-->
          <div class="box-body">
            <table id="data_table" class="table table-bordered table-striped">
              <thead>
              <tr>
                <th>应用</th>
                <th>部署类型</th>
                <th>部署环境</th>
                <th>部署时间</th>
                <th>部署版本</th>
                <th>部署人员</th>
                <th>详情</th>
              </tr>
              </thead>
              <tbody>
              <% @deployHistories.each do |deployHistory| %>
                  <tr>
                    <td><%= deployHistory.app_name %></td>
                    <td><%= I18n.t(deployHistory.deploy_type) %></td>
                    <td><%= deployHistory.env %></td>
                    <td><%= deployHistory.start_time.strftime('%Y-%m-%d %H:%M:%S') %></td>
                    <td><%= deployHistory.svn_revision rescue nil %></td>
                    <td><%= deployHistory.username  %></td>
                    <td>                      <div class="btn-group">
                        <button type="button" class="btn btn-info table_btn" onclick="window.open('/deploy_history/<%= deployHistory.id %>')">详情</button>
                      </div>
                    </td>
                  </tr>
              <% end %>
              </tbody>
            </table>
          </div>
          <!-- /.box-body -->
        </div>
        <!-- /.box -->
      </div>
      <!-- /.col -->
    </div>
    <!-- /.row -->
  </section>
  <!-- /.content -->
</div><!-- /.content-wrapper -->

<script type="text/javascript">
    $(function () {
        //列表排序脚本
        $("#data_table").dataTable({
            "bSort": false
        });
    })
</script>


